Skip to main content

Get Messages

AutomatR.Slack.Activities.GetMessages

The "Get Messages" activity in AutomatR is part of the Slack Messages activities package, leveraging Slack APIs to retrieve the most recent messages from a specified conversation. This activity facilitates the integration of Slack messaging functionality into automation workflows.

Properties

NameDescription
Input
Channel NameThe name of the channel from which to retrieve messages. String variables containing the desired channel name.
LimitThe limit of the maximum number of messages to retrieve. Integer variables indicating the maximum number of messages to fetch.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Get Messages" activity. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
Message ResponseOutputs a list of messages retrieved from the specified channel. Variables of type List<MessageResponse> to store the message responses.

How to use:

  1. Drag and drop the "Get Messages" activity onto the workflow.
  2. Configure the properties by specifying the channel name and optional limit for message retrieval.
  3. Optionally, configure the delay.
  4. Execute the workflow to retrieve messages from the specified Slack channel.

Example: Consider an example where the "Get Messages" activity is used to retrieve the most recent 10 messages from a channel named "General":

Get Messages:
Delay: 2
Channel Name: "General"
Limit: 10
Message Response: messagesList

In this example, the activity fetches the most recent 10 messages from the "General" channel and stores the response in a variable named "messagesList" for further handling in the workflow.